package com.example.springboot.mapper;

import com.example.springboot.controller.request.BaseRequest;
import com.example.springboot.controller.request.LoginRequest;
import com.example.springboot.controller.request.PasswordRequest;
import com.example.springboot.entity.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdminMapper {

    //   @Select("select * from user")
    List<Admin> list();

    void add(Admin admin);

    List<Admin> listByCondition(BaseRequest baseRequest);

    Admin getById(String username);

    void updateById(Admin obj);

    void delete(Admin admin);

    Admin getByUsernameAndPassword(@Param("username") String username,@Param("password") String password);

    int updatePassword(PasswordRequest request);


//    User getByUsername(LoginRequest request);
}
